package cn.ym.mall.service;

import cn.ym.mall.entity.Role;

import java.sql.SQLException;
import java.util.List;

public interface RoleService {
    /**
     * 获得所有角色信息
     * @return
     * @throws SQLException
     */
    public List<Role> getAll() throws SQLException;

    /**
     * 添加角色信息
     * @param role
     * @return
     * @throws SQLException
     */
    public boolean add(Role role) throws SQLException;

    /**
     * 根据角色Id删除角色信息
     * @param rid
     * @return
     * @throws SQLException
     */
    public boolean delete(Integer rid) throws SQLException;

    /**
     * 更新角色信息
     * @param role
     * @return
     * @throws SQLException
     */
    public boolean update(Role role) throws SQLException;

    /**
     * 根据角色编号获得角色信息
     * @param rid
     * @return
     * @throws SQLException
     */
    public Role getRoleByRid(Integer rid) throws SQLException;


}
